fix: filter deleted indexes in GetIndexedSegments to prevent stale segment loading#48558
Merged
sre-ci-robot merged 1 commit intomilvus-io:masterfrom Mar 27, 2026
Merged
Conversation
…gment loading GetIndexedSegments included deleted index entries in targetIndices but skipped them in the counting loop, causing indexedFields to never equal len(targetIndices) when deleted entries existed. This made every segment appear unindexed after drop+create index cycles, forcing GetQueryVChanPositions to fall back to loading stale pre-compaction segments instead of the optimized one. See also: milvus-io#48557 Signed-off-by: yangxuan <xuan.yang@zilliz.com>
XuanYang-cn
added a commit
to XuanYang-cn/milvus
that referenced
this pull request
Mar 26, 2026
…gment loading GetIndexedSegments included deleted index entries in targetIndices but skipped them in the counting loop, causing indexedFields to never equal len(targetIndices) when deleted entries existed. This made every segment appear unindexed after drop+create index cycles, forcing GetQueryVChanPositions to fall back to loading stale pre-compaction segments instead of the optimized one. pr: milvus-io#48558 See also: milvus-io#48557 Signed-off-by: yangxuan <xuan.yang@zilliz.com>
Contributor
|
[ci-v2-notice] To rerun ci-v2 checks, comment with:
If you have any questions or requests, please contact @zhikunyao. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #48558 +/- ##
==========================================
- Coverage 77.66% 77.61% -0.05%
==========================================
Files 2112 2112
Lines 351497 351495 -2
==========================================
- Hits 272984 272810 -174
- Misses 70197 70342 +145
- Partials 8316 8343 +27
🚀 New features to boost your workflow:
|
Collaborator
|
/lgtm |
Contributor
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: xiaofan-luan, XuanYang-cn The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
sre-ci-robot
pushed a commit
that referenced
this pull request
Mar 27, 2026
…gment loading [2.6] (#48559) ## Summary - Filter out deleted index entries from `targetIndices` in `GetIndexedSegments`, fixing a mismatch where `len(targetIndices)` included deleted entries but the counting loop skipped them - After drop+create index cycles, this caused all segments to appear unindexed, forcing `GetQueryVChanPositions` to load stale pre-compaction segments instead of the optimized one pr: #48558 issue: #48557 Signed-off-by: yangxuan <xuan.yang@zilliz.com> Signed-off-by: yangxuan <xuan.yang@zilliz.com>
XuanYang-cn
added a commit
to XuanYang-cn/milvus
that referenced
this pull request
Mar 27, 2026
…nt stale segment loading (milvus-io#48558) - Filter out deleted index entries from `targetIndices` in `GetIndexedSegments`, fixing a mismatch where `len(targetIndices)` included deleted entries but the counting loop skipped them - After drop+create index cycles, this caused all segments to appear unindexed, forcing `GetQueryVChanPositions` to load stale pre-compaction segments instead of the optimized one issue: milvus-io#48557 pr : milvus-io#48558 Signed-off-by: yangxuan <xuan.yang@zilliz.com>
liliu-z
pushed a commit
that referenced
this pull request
Mar 27, 2026
…gment loading (#48563) - Filter out deleted index entries from `targetIndices` in `GetIndexedSegments`, fixing a mismatch where `len(targetIndices)` included deleted entries but the counting loop skipped them - After drop+create index cycles, this caused all segments to appear unindexed, forcing `GetQueryVChanPositions` to load stale pre-compaction segments instead of the optimized one issue: #48557 pr : #48558 Signed-off-by: yangxuan <xuan.yang@zilliz.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
targetIndicesinGetIndexedSegments, fixing a mismatch wherelen(targetIndices)included deleted entries but the counting loop skipped themGetQueryVChanPositionsto load stale pre-compaction segments instead of the optimized oneissue: #48557
Signed-off-by: yangxuan xuan.yang@zilliz.com